package com.example.ribbonconsumer.controller;

import com.example.ribbonconsumer.hystrix.HelloServiceHystrix;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * ribbon-consumer
 * @date 2019-4-17 15:14:25
 * @author joker
 */
@RestController
@RequestMapping("/consumer/ribbon")
public class ConsumerController {

    @Resource
    private HelloServiceHystrix helloServiceHystrix;

    @GetMapping("/hello")
    public String helloConsumer(){
        return helloServiceHystrix.helloService();
    }
}
